package com.tju.shortlink.project.dto.req;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

@Data
public class ShortLinkCreateReqDTO {

    @Schema(description= "域名")
//    @NotNull(message = "域名不能为空")
    private String domain;

    @Schema(description= "原始链接")
    @NotNull(message = "原始连接不能为空")
    private String originUrl;

    @Schema(description= "分组标识")
    @NotNull(message = "分组不能为空")
    private String gid;

    @Schema(description= "创建类型 0：接口创建 1：控制台创建")
    private Integer createdType;

    @Schema(description= "有效期类型 0：永久有效 1：自定义")
    @NotNull(message = "有效期类型不能为空")
    private Integer validDateType;

    @Schema(description= "有效期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date validDate;

    @Schema(description= "描述")
    private String describe;

}
